import request from '@/utils/request'
import { ResultVoid, DeepRequired } from '../../interface'

/**
 * 修改头像
 * /user/avatar
 */
export function putUserAvatar(params: PutUserAvatarParams) {
  const paramsInput = {
    avatar: params.avatar,
  }
  return request.put<DeepRequired<ResultVoid>>(`/user/avatar`, null, {
    params: paramsInput,
  })
}

interface PutUserAvatarParams {
  avatar: string
}
